package com.itjiange.service.judge.codesandbox;

import com.itjiange.service.judge.codesandbox.impl.ExampleCodeSandBox;
import com.itjiange.service.judge.codesandbox.impl.RemoteCodeSandBox;
import com.itjiange.service.judge.codesandbox.impl.ThirdPartyCodeSandBox;

/**
 * 代码沙箱工厂
 * @author ItJianGe
 * @data 2024/3/25 8:38
 */
public class CodeSandBoxFactory {
    public static CodeSandBox getCodeSandBox(String codeSandBoxType){
        switch (codeSandBoxType) {
            case "remote":
                return new RemoteCodeSandBox();
            case "thirdParty":
                return new ThirdPartyCodeSandBox();
            default:
                return new ExampleCodeSandBox();
        }
    }
}
